package net.qhzw.geologr5.gis.service.system.controller;

import net.qhzw.geologr5.gis.common.framework.utils.JsonResult;
import net.qhzw.geologr5.gis.service.system.query.ProjectDataQuery;
import net.qhzw.geologr5.gis.service.system.service.ProjectDataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/***
 * 项目资料 前端控制器
 */
@RestController
@RequestMapping("projectData")
public class ProjectDataController {


    @Autowired
    private ProjectDataService projectDataService;

    /***
     * 项目资料查看
     * @return
     */
    @GetMapping("show")
    public JsonResult select(ProjectDataQuery query) {
        return projectDataService.select(query);
    }


    /***
     * 项目资料查询
     * @return
     */
    @GetMapping("projectInfo")
    public JsonResult projectInfo(ProjectDataQuery query) {
        return projectDataService.projectInfo(query);
    }


    /***
     * 修改项目资料的名称 数据权限
     * @param query
     * @return
     */
    @PostMapping("edit")
    public JsonResult edit(@RequestBody ProjectDataQuery query) {
        return projectDataService.edit(query);
    }


    /***
     * 批量修改数据权限
     * @param query
     * @return
     */
    @PostMapping("btchEditAuthority")
    public JsonResult btchEditAuthority(@RequestBody ProjectDataQuery query){
        return projectDataService.btchEditAuthority(query);
    }


}
